package com.tjjingpan.jetpack.viewmodel

import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import androidx.lifecycle.ViewModelProviders

/**
 * 向MainViewModel传递参数
 *
 *
 */

class MainViewModelFactory(private val countReserved:Int) : ViewModelProvider.Factory {
    override fun <T : ViewModel?> create(modelClass: Class<T>): T {
       return MainViewModel(countReserved)  as T
    }

}